#!/usr/bin/expect
spawn sudo bluetoothctl
expect "*#*"
send "connect 00:20:04:BD:40:B3\n"
send "menu gatt\n"
expect "*BT05*"
send "select-attribute /org/bluez/hci0/dev_00_15_83_F0_10_04/service0023/char0024\n"
expect "*BT05:/service0023/char0024]*"
send "notify on\n"
expect eof